using Godot;

[GlobalClass]
public partial class CBowSkill : CSkill
{
    public override void doHurt(NCharacter cha)
    {
        NCharacter enemy = cha.GetNodeOrNull<NCharacter>(cha.mData.mSkillTarget.mTargetPath);
        if (enemy != null && !enemy.IsDead)
        {
            NBowHurt rh = CHelp.insScene("res://scene/skill/弓箭攻击/NBowHurt.tscn") as NBowHurt;
            //角色路径
            rh.mSelfChaPath = cha.GetPath().ToString();
            //敌人路径
            rh.mRemoteChaPath = enemy.GetPath().ToString();
            enemy.AddChild(rh);
        }
    }
}